﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Markup;
using MVCManage.Model;
namespace MVCManage.Model.Base
{
    public class DbContextFactory
    {
    
      
        public static DbContext Create() {
            var dbcontext = CallContext.GetData("DbContext") as User;
            if (dbcontext==null)
            {
                dbcontext = new User();
                CallContext.SetData("DbContext",dbcontext);

            }
            return dbcontext;
        }
    }
}
